package com.ysd.service.impl;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

import com.ysd.entity.Product;
import com.ysd.mapper.ProductMapper;
import com.ysd.service.ProductService;

@Service
public class ProductServiceImpl implements ProductService{

	@Autowired
	private ProductMapper productMapper;

	

	@Override
	public Product findOneProduct(int id) {
		// TODO Auto-generated method stub
		return productMapper.getOneProduct(id);
	}
	
	@Override
	public List<Product> findProduct(int page, int limit) {
		return productMapper.getProduct(page, limit);
	}


	@Override
	public List<Product> cProduct(Product product) {
		// TODO Auto-generated method stub
		return null;
	}

	@Override
	public List<Product> findProducts(String name) {
		return productMapper.getProducts(name);
	}
	
	@Override
	public List<Product> findProductss(Product product) {
		return productMapper.getProductss(product);
	}
	
	@Override
	public int Counts(Product product) {
		return productMapper.Count(product);
	}

	@Override
	public List<Product> dialProduct() {
		return productMapper.dialProduct();
	}

	@Override
	public List<Product> watchProduct() {
		return productMapper.watchProduct();
	}

	@Override
	public List<Product> styleProduct() {
		return productMapper.styleProduct();
	}

	@Override
	public List<Product> hGetProduct(Product product) {
		return productMapper.hGetProduct(product);
	}

	@Override
	public int hGetCount(Product product) {
		return productMapper.hGetCount(product);
	}

	@Override
	public int hDeleteProduct(Product product) {
		return productMapper.hDeleteProduct(product);
	}

	@Override
	public List<Product> hGetProducts(Product product) {
		return productMapper.hGetProducts(product);
	}

	@Override
	public int hGetCounts(Product product) {
		return productMapper.hGetCounts(product);
	}

	@Override
	public int insertProduct(Product product) {
		return productMapper.insertProduct(product);
	}

	@Override
	public int updateProduct(Product product) {
		return productMapper.updateProduct(product);
	}

	@Override
	public int updateImg(Product product) {
		// TODO Auto-generated method stub
		return productMapper.updateImg(product);
	}

	@Override
	public int updateCanuse(Product product) {
		// TODO Auto-generated method stub
		return productMapper.updateCanuse(product);
	}
	
	@Override
	public List<Product> chanDi() {
		return productMapper.chanDi();
	}

	@Override
	public List<Product> caiZhi() {
		return productMapper.caiZhi();
	}

	@Override
	public List<Product> fengGe() {
		return productMapper.fengGe();
	}
	
}
